<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link rel="stylesheet" href="__PUBLIC__/assets/css/jquery-ui.css" />
</block>
<block name="stylecss">
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>
    <li>
        <a href="{:U('Adminauth/admin')}">管理员列表</a>
    </li>
    <li class="active">管理员详情</li>
</ul><!-- /.breadcrumb -->

</block>

<block name="content">
<div class="row" style="margin-bottom:7px">
    <div class="col-xs-12"><span class="label label-warning"><i class="ace-icon fa fa-user bigger-120"></i> 管理员详情 </span></div>
</div>
<table class="table table-striped table-bordered table-hover" >
    <tr>
        <th>账号身份</th>
        <td><span style="color:green">{$admininfo.title}</span></td>
    </tr>
    <tr>
        <th>账号名称</th>
        <td>{$admininfo.admin_name}</td>
    </tr>
    <tr>
        <th>联系电话</th>
        <td>{$admininfo.admin_phone}</td>
    </tr>
    <tr>
        <th>头像</th>
        <td><?php if (!empty($admininfo['admin_avatar'])) { ?>
            <img id="avatar" class="editable img-responsive editable-empty" src="{$admininfo.admin_avatar}" style='width:150px;height:150px'></img>
            <?php } else { ?>
            <span style="color:blue">暂无头像</span>
            <?php } ?></td>
    </tr>
    <tr>
        <th>拥有的权限</th>
        <td>
            <table class="table table-striped table-bordered table-hover">
                <?php
                    for ($i=0; $i < $cols; $i++) {
                        echo('<tr>');
                        for ($j=0; $j < 5; $j++) {
                            echo('<td>');
                            if ($admininfo['rules'] == '*' || in_array($auth_arr[$i*5+$j]['id'], $rule_arr)) {
                                echo "<span style='color:green'>".$auth_arr[$i*5+$j]['title']."</span>";
                            }else{
                                echo "<span style='color:red'>".$auth_arr[$i*5+$j]['title']."</span>";
                            }
                            echo('</td>');
                        }
                        echo('</tr>');
                    }
                ?>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan="2"><span class="btn btn-sm" onClick="location.href='{:U('Adminauth/admin')}'">返回</span></td>
    </tr>
</table>
</block>
<block name="scripts"></block>
<block name="jscript">
<script script="text/javascript">
    $(function(){
        $('#menu_adminauth').addClass('active open');
        $('#menu_adminauth_admin').addClass('active');
    });
</script>
<script script="text/javascript">

</script>
</block>